var express = require('express');
var router = express.Router();

const db = require("../public/javascripts/db")

router.post('/', function (req, res, next) {
        let info = req.body;
        console.log(info);
        // 可以注册
        info.user_paytime = new Date();
        let sql = "insert into money set ?";
        db(sql, info, (result) => {
            console.log(result);
            if (result.affectedRows == 1) {
                res.json({
                    code: 200,
                    message: "用户添加成功"
                })
            }
        })
    }),

    module.exports = router;